home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Essential Home & Business Collection
/
The Essential Home & Business Collection.iso
/
27
/
3
/
5
/
HP22D5.ZIP
/
EXTERN
/
GETSCR.C
< prev
next >
Wrap
Text File
|
1991-04-16
|
1KB
|
61 lines
#include "extern.h" /* Extensions need these! */
HANDLE near hdl = NULL;
/*
** CopyPaint
**
** Syntax:
**
** copyPaint [,<isPage>]
**
** The <isPage> parameter is optional. If TRUE, the paint layer of the
** page is copied. Otherwise, the paint layer of the background is copied.
*/
CopyPaint(int NumArgs,HANDLE IsPage)
{
if (NumArgs > 1) return(STOP);
FreePaint();
hdl = GetScreen(NumArgs == 1 ? htob(IsPage) : TRUE,1,1,80,25);
return(STOP);
}
/*
** PastePaint
**
** Syntax:
**
** pastePaint [,<isPage>]
**
** The <isPage> parameter is optional. If TRUE, the paint layer of the
** page is pasted into. Otherwise, the paint layer of the background
** is pasted into.
*/
PastePaint(int NumArgs,HANDLE IsPage)
{
if (NumArgs > 1) return(STOP);
if (hdl) SetScreen(NumArgs == 1 ? htob(IsPage) : TRUE,1,1,80,25,deref(hdl));
return(STOP);
}
FreePaint()
{
FreeHandle(hdl);
hdl = NULL;
}
pascal far WhenUnLoaded()
{
FreePaint();
}
POOL pascal Pool[] = {
{"copyPaint", CopyPaint, 0, HANDLER},
{"pastePaint", PastePaint, 0, HANDLER},
{"freePaint", FreePaint, 0, HANDLER},
{NULL, NULL, 0, 0} };